import { HintBtnView } from "../mapUI/HintBtnView";
import { LayerManager } from "../../manager/LayerManager";
import { RightTopLayerLine } from "../../manager/RightTopLayerLine";
import { RightTopLayerIndex } from "../../manager/RightTopLayerIndex";
import { ObjCreate } from "../common/ObjCreate";
import { ResFileConst } from "../../resource/ResFileConst";
import { Dispatcher } from "../../../mvc/core/Dispatcher";
import { DataEvent } from "../../events/DataEvent";
import { EventName } from "../../mvc/EventName";
import { GLoadedButton } from "../../../../com/mui/controls/GLoadedButton";
//class IllustrateIconBtn
    
    export  class IllustrateIconBtn extends HintBtnView
    {
        constructor()
        {
            super();
            this.initUI();
            return;
        }

        protected initUI(): void
        {
            buttonMode = true;
            addEventListener(flash.events.MouseEvent.CLICK, this.onMouseClickHandler);
            layer = LayerManager.rightTopUILayer;
            this.line = RightTopLayerLine.lineOne;
            this.index = RightTopLayerIndex.IllustrateIconBtn;
            this._loadedBtn = ObjCreate.createGLoadedButton(ResFileConst.IllustrateMainBtn, 0, 0, 60, 50, this);
            return;
        }

        protected onMouseClickHandler(arg1: Object /* flash.events.MouseEvent */): void
        {
            Dispatcher.dispatchEvent(new DataEvent(EventName.IllustrateModuleOpen));
            return;
        }

        protected /* var */_loadedBtn: GLoadedButton;
    }
